<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>添加银行卡</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <link href="css/button.css" rel="stylesheet" type="text/css" />
    <link href="css/icon.css" rel="stylesheet" type="text/css" />
    <link href="css/add-bank.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="form-body">
        <form action="">
            <div class="form-item">
                <span class="item-title">手机号</span>
                <a class="item-action" href="javascript:;">
                    <input type="text" name="mobile" class="control-text" placeholder="一串号码">
                    <i class="icon icon-cross"></i>
                </a>
            </div>
            <div class="form-item">
                <span class="item-title">姓名</span>
                <a class="item-action" href="javascript:;">
                    <input type="text" name="name" class="control-text" placeholder="你的大名">
                    <i class="icon icon-cross"></i>
                </a>
            </div>
            <div class="form-item">
                <span class="item-title">开户行</span>
                <a class="item-action tn" href="javascript:;">
                    <input type="text" name="type_name" readonly class="control-text" placeholder="存款地方">
                    <i class="icon icon-down"></i>
                </a>
            </div>
            <div class="form-item">
                <span class="item-title">卡号</span>
                <a class="item-action" href="javascript:;">
                    <input type="text" name="account_number" class="control-text" placeholder="一串数字">
                    <i class="icon icon-cross"></i>
                </a>
            </div>
        </form>
    </div>
    <button class="btn btn-submit bsm yellow">立即绑定</button>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript"></script>
    <script src="js/template.js" type="text/javascript"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            bee.wxConfig(function() {
                bee.hideAllNonBaseMenuItem();
            }, function(res) {});

            $('body').on('click', '.tn', function() {
                $('.dialog').dialog('show');
            });

            $('body').on('click', '.close', function() {
                $('.dialog').dialog('hide');
            });

            $('body').on('click', '.ok', function() {
                var text = $('.dialog .icon-dot').parent().text();
                $('[name="type_name"]').val(text);
                $('.dialog').dialog('hide');
            });

            $('body').on('click', '.dialog .icon', function() {
                $('.dialog .icon').removeClass('icon-dot').addClass('icon-dot-blank');
                $(this).removeClass('icon-dot-blank').addClass('icon-dot');
            });

            $('body').on('click', '.bsm', function() {
                var data = {};
                data.mobile = $('[name="mobile"]').val();
                data.name = $('[name="name"]').val();
                data.type_name = $('[name="type_name"]').val();
                data.account_number = $('[name="account_number"]').val();
                data.type = 1;
                bee.request({
                    url: '/Member/Index/add_withdrawals',
                    data: data,
                    success: function(rs) {
                        bee.open('bank.html');
                    }
                });
            });
        });
    </script>
    <div class="dialog">
        <div class="dialog-title">说出你的银行吧～</div>
        <div class="dialog-body">
            <ul id="feeling-dom">
                <li><i class="icon icon-dot"></i> 中国建设银行</li>
                <li><i class="icon icon-dot-blank"></i> 中国银行</li>
            </ul>
        </div>
        <div class="dialog-foot">
            <a href="javascript:;" class="font-red ok">确认</a>
            <a href="javascript:;" class="font-blue close" style="margin-left: 40%;">关闭</a>
        </div>
    </div>
</body>

</html>
